﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using HtmlAgilityPack;


namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            var filePath = "TestForm.txt";
            // From File
            var parser = new FormHtmlPaser();
            var controls = parser.GetControls(File.ReadAllText(filePath));
            foreach (var item in controls)
            {
                if (item.GType != GType.none)
                {
                    Console.WriteLine(item);
                    foreach (var chil in item.Children)
                    {
                        Console.WriteLine(chil);
                    }
                }
                else
                {
                    Console.WriteLine(item);
                }

            }
        }
    }
}
